const CLOCK_TYPEID     = (UInt === UInt64) ? 0x5FBA9CC226F44571 : 0x7C349DB5
const CLOCK_HASH0      = Base.hash(zero(UInt), CLOCK_TYPEID)

const UNIVTIME_TYPEID  = (UInt === UInt64) ? 0x4DE2E78CA3190999 : 0x2CD21471
const UNIVTIME_HASH0   = Base.hash(zero(UInt), UNIVTIME_TYPEID)

const LOCALTIME_TYPEID = (UInt === UInt64) ? 0x47C3306D5BC508EB : 0x4BC4ABED
const LOCALTIME_HASH0  = Base.hash(zero(UInt), LOCALTIME_TYPEID)

const DURATION_TYPEID  = (UInt === UInt64) ? 0x2CB4158B0757301F : 0x49DADDCB
const DURATION_HASH0   = Base.hash(zero(UInt), DURATION_TYPEID)

const TIMESPAN_TYPEID  = (UInt === UInt64) ? 0x1FA4528926C76CD4 : 0x3AF77825
const TIMESPAN_HASH0   = Base.hash(zero(UInt), TIMESPAN_TYPEID)

@inline function Base.hash(clock::Clock, h::UInt)
    Base.hash(
        clock.value,
        (Base.hash(h ⊻ CLOCK_TYPEID) ⊻ CLOCK_HASH0) )
end

@inline function Base.hash(clock::UniversalTime, h::UInt)
    Base.hash(
        clock.value,
        (Base.hash(h ⊻ UNIVTIME_TYPEID) ⊻ UNIVTIME_HASH0) )
end

@inline function Base.hash(clock::LocalTime, h::UInt)
    Base.hash(
        clock.value,
        (Base.hash(h ⊻ LOCALTIME_TYPEID) ⊻ LOCALTIME_HASH0) )
end

@inline function Base.hash(duration::Duration, h::UInt)
    Base.hash(
        duration.value,
        (Base.hash(h ⊻ DURATION_TYPEID) ⊻ DURATION_HASH0) )
end

@inline function Base.hash(span::TimeSpan, h::UInt)
    Base.hash(
        span.value,
        (Base.hash(h ⊻ TIMESPAN_TYPEID) ⊻ TIMESPAN_HASH0) )
end
